<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>IT资产管理系统</title>

    <!-- Bootstrap -->
    <link href="../css/bootstrap.min.css" rel="stylesheet">
    <link href="../css/bootstrap-table.css" rel="stylesheet">
    <link href="../css/bootstrap-duallistbox.min.css" rel="stylesheet">
    <link rel="stylesheet" href="../css/toastr.min.css">

    <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询（media queries）功能 -->
    <!-- 警告：通过 file:// 协议（就是直接将 html 页面拖拽到浏览器中）访问页面时 Respond.js 不起作用 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div th:include="common/logo :: logo"></div>
<form id="formValues" class="form-horizontal" role="form">
    <fieldset>
        <div class="form-group">
            <div class="row">
                <!--用户信息部分-->
                <div class="col-xs-4 col-xs-offset-1">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                           选择你将要更改的下拉框列表
                        </div>
                        <div class="form-group" style="margin-top: 2%">
                            <label for="select" class="col-xs-3 col-xs-offset-1 control-label">请选择:</label>
                            <div class="col-xs-4">
                                <select id="select" name="select" class="form-control">
                                    <option value="type">资产类别</option>
                                    <option value="area">区域</option>
                                    <option value="step">工序</option>
                                    <option value="state">资产状态</option>
                                    <option value="Pstate">性能状态</option>
                                    <option value="department">部门</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div>
                        <input id="commit" type="button" class="btn btn-primary" value="保存编辑" style="width: 30%">
                        <input onclick="refresh()" type="button" class="btn btn-primary" value="重置" style="width: 30%">
                    </div>
                </div>
                <!--多选框部分-->
                <div class="col-xs-6">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            更改或添加您需要的值
                        </div>
                        <div class="panel-body">
                            <button onclick="addValue()" class="btn btn-primary col-xs-offset-1" type="button">添加</button>
                                <div id="values" class="col-md-12 pre-scrollable" style="margin-top: 2%;">

                                </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </fieldset>
</form>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">Modal title</h4>
            </div>
            <div class="modal-body">
                <p>确认要删除吗!确认后<span style="color: red">无法重置.</span></p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" onclick="del()" class="btn btn-primary">确认</button>
            </div>
        </div>
    </div>
</div>

</body>
<script src="../js/jquery-3.4.0.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/toastr.min.js"></script>
<script src="../js/role/select.js"></script>
<script th:inline="javascript" type="text/javascript">

    var permission = null
    $(document).ready(function () {
        //添加导航栏选中样式
        $("#permission").addClass("active")
        //从session获取permission
        permission = [[${session.permission}]]
    })

    //根据permission判断该用户是否有权限更改权限
    function checkPermission() {
        if (permission != "sadmin") {
            return false
        }
        return true
    }


</script>

</html>